<template>
    <view>
        <!-- template对应的原始代码，为保证正常显示，已对其进行隐藏。 -->
        <block name="searchTpl" v-if="false">
            <view class="main main-search">
                <view class="bar search bg-white">
                    <view class="search-form round">
                        <text class="icon-search"></text>
                        <input type="text" v-model="search" placeholder="请输入搜索内容" confirm-type="search" @confirm="bindSearchConfirm" maxlength="20" />
                        <text v-if="search.length > 0" @tap="bindClearKeyTap" class="icon-roundclosefill text-l text-gray clear"></text>
                    </view>
                    <view class="action">
                        <button @tap="url" data-type="back" class="btn bg-project text-white shadow-blur round">返回</button>
                    </view>
                </view>

                <view class="his">
                    <view class="title">
                        <view class="tit">历史记录</view>
                        <text @tap="bindDelHisTap" class="del text-small icon-delete"></text>
                    </view>

                    <view class="search-content">
                        <view @tap="bindKeyTap" :data-key="item" class="btn mid round text-darkgreen" v-for="(item, index) in hisKeys" :key="index">{{ item }}</view>
                    </view>
                </view>
            </view>
        </block>
    </view>
</template>

<style>
@import './search_tpl.css';
</style>
